package com.gbk.clickhouseservicestruct.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.myweb.ck.mapping.ChTable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

@ChTable(name = "tig.T_TIG_CYCLE_RECORD")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TIG_CYCLE_RECORD {

    /**
     * 路口id
     */
    private String cross_id;

    /**
     * 信号机编号
     */
    private String signalController_id;


    @Temporal(TemporalType.TIMESTAMP)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date start_date;

    /**
     * 周期长度
     */
    private Integer cycle_len;

    /**
     * 阶段列表
     */
    private String stage_list;

    /**
     * 阶段放行时间列表
     */
    private String stage_time_list;

    /**
     * 方案号
     */
    private Integer pattern_no;

    private Integer control_mode;
}